package ace.handling;

import gov.nist.atlas.Anchor;
import gov.nist.atlas.Annotation;
import gov.nist.atlas.Id;
import gov.nist.atlas.Region;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;

import org.mitre.jawb.atlas.SubordinateSetsAnnotation;

public class Entity {
	
	private Id id;

	protected String type;

	protected Entity root;

	protected int fullstart;

	protected int fullend;

	protected int headstart;

	protected int headend;

	protected Document doc;

	private ArrayList<Entity> entitiesRelated;

	protected Entity(Id id){
		
		this.id = id;	
		
		entitiesRelated = new ArrayList<Entity>();
	}
	
	public void associate(Entity mentionedEntity) {
		
		mentionedEntity.type = type;
		mentionedEntity.root = this;
		this.entitiesRelated.add(mentionedEntity);
		
	}

	public int getEnd() {
		return fullend;
	}

	public int getStart() {
		return fullstart;
	}

	public String getTag() {
		return type;
	}

	public Id getId() {
		
		return id;
		
	}

	public List<Entity> getAssociatedEntities(){
		return entitiesRelated;
	}
}
